//
//  DisCollectionViewCell.m
//  A段
//
//  Created by RAMBO on 15/4/11.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "DisCollectionViewCell.h"


#define ALLHW 150
#define COLORGRAY 0.35


@implementation DisCollectionViewCell

- (void)dealloc
{
    [_shadowView release];
    [_imageView release];
    [_dataLabel release];
    [_titleLabel release];
    
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 150, 150)];
        [self.contentView addSubview:_imageView];
        [_imageView release];
        [_imageView.layer setShadowOffset:CGSizeMake(5, 5)];
        [_imageView.layer setShadowColor:[[UIColor blackColor] CGColor]];
        _imageView.layer.shadowRadius = 5;
        _imageView.layer.shadowOpacity = 1;
        
        self.shadowView = [[UIView alloc] initWithFrame:CGRectMake(0, 110, 150, 40)];
        [_shadowView setBackgroundColor:[UIColor colorWithRed:COLORGRAY green:COLORGRAY blue:COLORGRAY alpha:0.6]];
        [self.contentView addSubview:_shadowView];
        [_shadowView release];
        
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, 130, 20)];
        [_shadowView addSubview:_titleLabel];
        [_titleLabel release];
        [_titleLabel setFont:[UIFont boldSystemFontOfSize:15]];
        [_titleLabel setTextColor:[UIColor whiteColor]];

        
        self.dataLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 20, 130, 20)];
        [_shadowView addSubview:_dataLabel];
        [_dataLabel release];
        [_dataLabel setFont:[UIFont systemFontOfSize:13.5]];
        [_dataLabel setTextColor:[UIColor whiteColor]];
        
        
    }
    return self;
}

@end
